<?php 
/**
 * ... ...
 * ... ...
 *
 */ 


JCAT_Package::ImportClass('JCAT_ViewGtk',JCAT::PACKAGE_MVCGTK) ;
JCAT_Package::ImportInterface('JCAT_IViewForm',JCAT::PACKAGE_MVC) ;


/**
 * 视图类 ControllerView 
 *
 * @access public
 */
class ControllerView
	//<<[UnmodifiableBlock.Start]::Extends And Implements::>>//
	extends JCAT_ViewGtk
	implements JCAT_IViewForm
	//<<[UnmodifiableBlock.End]::Extends And Implements::>>// 
{
	
	/**
	 * 构造函数 
	 *
	 * @access	public
	 * @param	$aParent	JCAT_IViewContainer		视图的父对象(父视图 或 控制器)
	 * @return	void
	 */
	public function ControllerView(JCAT_IViewContainer $aParent)
	{
		//<<[UnmodifiableBlock.Start]::Call Parent Construct::>>//
		$this->JCAT_ViewGtk('ControllerView','template.ControllerView.glade','ControllerView',$aParent) ;
		//<<[UnmodifiableBlock.End]::Call Parent Construct::>>// 

		$this->Initialize() ;	
	}
	
	/**
	 * 初始化 视图 
	 *
	 * @access	public
	 * @return	void
	 */
	public function Initialize()
	{
		//<<[UnmodifiableBlock.Start]::UICtrl Children::>>//
		// 载入UI控件
		$sCurrentDirectory = dirname(__FILE__).'/' ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.ControllerPath.php'),'ControllerPath') ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.ControllerName.php'),'ControllerName') ;
		JCAT_Package::ImportClass('MsgType',$sCurrentDirectory.'Instance.UICtrls/class.MsgType.php') ;
		$this->AddUICtrl(new MsgType(),'MsgType') ;
		JCAT_Package::ImportClass('MsgPriter',$sCurrentDirectory.'Instance.UICtrls/class.MsgPriter.php') ;
		$this->AddUICtrl(new MsgPriter(),'MsgPriter') ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.UseMsgQueue.php'),'UseMsgQueue') ;
		//<<[UnmodifiableBlock.End]::UICtrl Children::>>// 
		
		//<<[UnmodifiableBlock.Start]::View Children::>>//

		//<<[UnmodifiableBlock.End]::View Children::>>// 
		
		// 在此加入其它初始化代码 
	 	// TODO ... ...

	}
	
	/**
	 * 创建主窗体事件 
	 *
	 * @access	protected
	 * @return	void
	 */
	 protected function OnInitView()
	 {
	 	// TODO
	 	// ... ...
	 }


	 
	 /**
	  * what's this
	  * 
	  * @access	public
	  * @param	$sPath		string			what's this
	  * @return	void
	  */
	 public function SetPath($sPath)
	 {
	 	JCAT_ASSERT::ASSERT_STRING($sPath) ;
	 	
	 	$aUICtrl = $this->GetUICtrl('ControllerPath') ;
	 	JCAT_ASSERT::ASSERT_INSTANCE($aUICtrl,'JCAT_IUICtrl') ;
	 	
	 	$aUICtrl->SetDataByExchange($sPath) ;
	 }

	 
	 /**
	  * what's this
	  * 
	  * @access	public
	  * @return	void
	  */
	 public function OnEntViewNameChanged(GtkEntry $wndEntry)
	 {
	 	$sName = $wndEntry->get_text() ;
	 	
	 	$sControllerPath = $this->GetUICtrlExchangeData('ControllerPath') ;
	 	
	 	// 目录
	 	if( !is_dir($sControllerPath) )
	 	{
	 		$sControllerPath = dirname($sControllerPath) ;
	 	}
	 	$sControllerPath = JCAT_Global::TidyPath($sControllerPath) ;
	 	
	 	if( !empty($sName) )
	 	{
	 		$sControllerPath = "{$sControllerPath}class.{$sName}.php" ;
	 	}

	 	$this->SetUICtrlExchangeData('ControllerPath',$sControllerPath) ;
	 }
}

?><?
/**
 * [注意!!]
 *	以下内容由 JCAT PHP Toolbox 自动维护，手动更改的内容会被 JCAT PHP Toolbox 抹除，
 *	同时还可能破坏格式，导致 JCAT PHP Toolbox 无法正常读取。
 */
/*<<[UnmodifiableBlock.Start]::Coder Dialog Data::>>&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&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